package org.lgl.goods.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.lgl.common.result.Result;
import org.lgl.goods.model.TestVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lgl
 * @date 2022/2/24 17:26
 */
@Api(tags = "Goods Module")
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @ApiOperation(value = "通过 id 查询 TestVO")
    @GetMapping("/get/{id}")
    public Result<TestVO> testGet(@PathVariable(name = "id") Long id) {
        return Result.success(new TestVO(id, "success"));
    }
}
